function path = get_path_from_pred_vector(pred_vector, enode)
    i = 1;
    path(i) = enode;
    while pred_vector(path(i)) ~= 0
        i=i+1;
        path(i) = pred_vector(path(i-1));
    end
    path = fliplr(path);
end